import { createRouter, createWebHistory } from "vue-router";

const routes = [
    {
        name: "echartList", 
        path: "/", 
        redirect:'/list',
        component: () => import("../layout/index.vue"),
        children: [
            {
                path: "/list",
                component: () => import("../views/List/index.vue"),
            }
        ]
    },
    {
        name: "echartItem",
        path: "/details/:id",
        component: () => import("../views/Details/index.vue"),
    },
    {
        name: "search",
        path: "/search",
        component: () => import("../views/Search/index.vue"),
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;
